home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CADAR
/
Lengths
/
length-repeat-var
< prev
next >
Wrap
Text File
|
1998-10-22
|
970b
|
34 lines
length-repeat-var
min max length-list &key (seed nil)
like length-repeat-l but makes random choices inside min
and max.
with big difference between min and max also subdivides
into subgroups so instead of even division like
1/2 -> 1/16 1/16 1/16 1/16 it can be
1/2 -> 1/16 1/16 1/24 1/24 1/24.
for a more controllable version see also sub-divide-rhythm
and sub-divide-with-melody,
if :seed is a non nil value you will get the same result
every time and with nil (default) you will get different
versions every time.
non nil seeds should be inside 0.0001 and 0.9999
(length-repeat-var 2 3 '(1/2 1/4 1/2 1/8 1/8))
-> varies
(length-repeat-var 3 5 '(1/2 1/4 1/2 1/8 1/8) :seed 0.02)
->((1/6 1/6 1/6) (1/16 1/16 1/16 1/16) (1/8 1/8 1/12 1/12 1/12) (1/24 1/24 1/24) (1/32 1/32 1/32 1/32))
just use flatten if you want one list.
(flatten
(length-repeat-var 2 3 '(1/2 1/4 1/2 1/8 1/8) :seed 0.31))
->(1/4 1/4 1/12 1/12 1/12 1/6 1/6 1/6 1/16 1/16 1/24 1/24 1/24)